<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
    <title>美策平台</title>
    <link rel="icon" type="image/png" href="/img/icon.png">
    <link rel="stylesheet" type="text/css" href="../datepicker/jquery-ui.min.css">
    <link type="text/css" rel="stylesheet" href="../css/loginMobile.css"/>
    <script type="text/javascript" src="../js/jquery.min.js"></script>
    <script src="../datepicker/jquery-ui.min.js"></script>
    <script type="text/javascript" src="/pc/js/all.js"></script>
</head>
<body id="Ibody">
<!--
	制作：陈道祥
	页面：员工工厂求职意向
	更新：九哥
-->





<!-----------员工工厂求职意向页面---------->
<div class="stepTwo" id="IstepSevenCareerFactory">
	<form action="/api/member/staff/set-fac-will"
          enctype="multipart/form-data" method="post">
		<input type="hidden" name="app_access" class="app_access" value="">
		<input type="hidden" name="token" class="token" value="">
		<input type="hidden" name="type" class="type" value="">
		<input type="hidden" name="cate" class="cate" value="">
        <div class="modelPanel">
            <div class="modelTile">求职意向</div>
            <div class="businessTitle">面料种类：</div>
            <div class="businessItemDiv" id="fabricTypeCheck">
            </div>
            <div class="modelPanel">
                <div class="businessTitle">技术等级：</div>
                <div class="businessItemDiv" id="techLevelRadio">
                </div>
            </div>
            <div class="businessTitle">擅长技能：</div>
            <div class="businessItemDiv" id="skillCheck">
            </div>
        </div>
        <div class="stopFloat"></div>
        <div class="companyInfoSpace"></div>
        <div class="companyRemark">
            备注：
            方便你的客户找到你、招聘的员工找到你、了解你、信任你，
            图片尽量上传完善。让客户多了解自己，容易接单成功。
            细节决定成败，图片清晰。
        </div>
        <div class="nextStepDiv">
            <span class="prevStep" onclick="history.go(-1)">返回</span>
            <button type="submit" style="border:0;" class="nextStep">保存</button>
        </div>
	</form>
</div>
<!-----------员工工厂求职意向页面---------->





<!-----------提示信息---------->
<div id="errMsg"></div>
<!-----------提示信息---------->
</body>
<script type="text/javascript" src="../js/loginStaff.js"></script>
<script type="text/javascript" src="../js/cache.js"></script>
<script>
	(function(){
		getFacWill();
	})();
    /**
     * 员工工厂求职意向，获取
     * */
    function getFacWill(){
        var userInfo = cacheGet('userInfo'); //获取用户信息
        var facWills = cacheGet('facWills'); //获取用户工厂求职意向
        if (userInfo==null || userInfo.token=='undefined') {
            getErrMsg('没有登录！'); return;
        }
        $('.app_access')[0].value = app_access;
        $('.token')[0].value = userInfo.token;
        $('.type')[0].value = userInfo.type;
        $('.cate')[0].value = userInfo.cate;
        //获取本地缓存
        if (facWills) {
            getFabricTypeList(facWills.fabrics);
            getTechLevelList(facWills.tech);
            getSkillList(facWills.skills);
        }
        var data = {
            app_access:app_access,
            token:userInfo.token,
            type:userInfo.type,
            cate:userInfo.cate
        };
        //请求数据，更新缓存
        $.ajax({
            type:'post',
            url:getDomain() + 'staff/fac-will',
            data:data,
            success:function(res){
                //console.log(res); return;
                if (res.code!=0) {
                    getFabricTypeList(0);
                    getTechLevelList(0);
                    getSkillList(0);
                    console.log(res); return;
                }
                getFabricTypeList(res.data.fabrics);
                getTechLevelList(res.data.tech);
                getSkillList(res.data.skills);
                //更新本地缓存
                cacheSet('facWills',res.data);
            },
            error:function(){
                console.log('操作失败！'); return;
            }
        });
    }
    /**
     * 地址前缀
     * */
    function getDomain(){
        return '/api/member/';
    }
</script>
</html>